<script setup lang="ts">
import { ref } from 'vue'
const isShow = ref(false)
const toggle = (a: string) => {
  isShow.value = !isShow.value
  alert(a)
}
</script>

<template>
  <div class="app-page">
    <div class="box" v-show="isShow"></div>
    <button @click="toggle('text')">按钮</button>
  </div>
</template>

<style lang="css" scoped>
.box {
  width: 200px;
  height: 200px;
  background-color: red;
}
</style>
